Previous | Next

# free

    $ free
                 total       used       free     shared    buffers     cached
    Mem:       3103512     778880    2324632          0     103256     430624
    -/+ buffers/cache:     245000    2858512
    Swap:      2249060          0    2249060

(before/after running program)

# vmstat

    $ vmstat 3     <— update (secs)
    procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
     r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
     0  0      0 2325896 103308 430620    0    0    16     9   64  194  1  0 98  0

vmstat also great -- can tell you a lot about CPU too.